home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _98621DF48B9C488E80593CA617A6A099 < prev    next >
Encoding:
Text File  |  2004-01-06  |  901 b   |  43 lines

  1. // ===============================================================
  2. // Vertex Program: Cartoon
  3. // Description: used for cartoon render mode
  4. // Last Update: 30/04/2003
  5. // Coder: Tiago Sousa
  6. // ===============================================================
  7.  
  8. #include "../CGVPMacro.csi"
  9.  
  10.  
  11. // setup vertex components
  12. MainInput
  13. {
  14.   // common model view matrix
  15.   uniform float4x4 ModelViewProj,
  16.   
  17.   uniform float4   Offset0,
  18.   uniform float4   Offset1,
  19.   uniform float4   Offset2,
  20.   uniform float4   Offset3  
  21. }
  22.  
  23. DeclarationsScript
  24. {
  25.   // vertex input
  26.   IN_T0
  27.   // vertex output
  28.   OUT_T0_T1_T2_T3
  29. }
  30.  
  31. // output vertex position
  32. PositionScript = PosCommon
  33.  
  34. CoreScript
  35. {  
  36.   OUT.Tex0.xy = IN.TexCoord0.xy+Offset0.xy;
  37.   OUT.Tex1.xy = IN.TexCoord0.xy+Offset1.xy;
  38.   OUT.Tex2.xy = IN.TexCoord0.xy+Offset2.xy;
  39.   OUT.Tex3.xy = IN.TexCoord0.xy+Offset3.xy;
  40.   
  41.   return OUT;
  42. }
  43.